package com.bob.light.activity

import com.bob.light.TuyaHomeSDKHelper
import com.bob.light.config.DeviceConfig

class SplashActivity : BackPressedWrapperActivity() {

    override fun onResume() {
        super.onResume()
        DeviceConfig.queryDeviceList()
        val isLogin = checkLogin()
        if (isLogin) {
            MainActivity.navigation(this@SplashActivity)
        } else {
            LoginActivity.navigation(this@SplashActivity)
        }
        finish()
    }

    private fun checkLogin() = TuyaHomeSDKHelper.checkLogin()

}